import java.util.Calendar;
import java.util.Date;

import log.debug.LogInterface;
import log.debug.LogTool;

public class TestDate {
	static String TAG = "TestDate";
	static LogInterface mLog = LogTool.getLogType();
	
	/**
	 * 判断当前日期是否属于夜间。 
	 * 判断依据：系统时间0:00~06:00，23：00~24:00
	 * @return
	 */
	public static boolean isNight(){
		Calendar calendar = Calendar.getInstance();
		int hour = calendar.get(Calendar.HOUR_OF_DAY);
		mLog.d(TAG, "hour = " + hour);
		
		if (hour<6 || hour>23){
			return true;
		}
		
		return false;
	}

}
